public class DateclassDemo{
        int year,month,day;
        void  setDate(int y,int m ,int d){
               year=y;  month=m;  day=d;
         }
         boolean IsLeapYear(){
              if(year %400==0|| year %4==0&& year %100!=0)  return true;
               else return false;
}
public static void main(String args[]){
           DateclassDemo d1;              //Ķ
           d1=new DateclassDemo();        //Ϊռ
           d1.setDate(2008,1,1);            //÷ֵ
           if(d1.IsLeapYear())  System.out.println(d1.year +" is Leap year!");
           else System.out.println(d1.year+" is not Leap year!");
}
}